package jgl.vajra.driver.constant;

/**
 * @Author zhangshuqi
 * @CreateTime 2018/3/19
 * @Describe
 */

public class Constant {
    public static final int LAST_ID_DEFAULT = -1;
    public static final int ERROR_CODE_NORMAL = 110;
    public static final int ANDROID_PLATFORM = 4;// platfrom 1 android
    public static final String SEARCH_SHIPPED_NORMAL = "All";// platfrom 1 android
    public static final int STUDY_RECORD_TIME = 5;
    public static final int STUDY_UPLOAD_TIME = 60;

    public static final class QUESTION_PACKAGE_TYPE {

        public final static int INTERVIEW = 0;
        public final static int SPECIAL = 1;
    }

    public static final class QUESTION_CHOICE_TYPE {

        public final static int SINGLE = 1;
        public final static int MULTIPLE = 2;
        public final static int INDEFINITE = 3;
    }


    public static class COURSE_LIVE_STATUS {
        public static final int UNSTART = 10;
        public static final int NONE = 0;
        public static final int LIVEING = 20;
        public static final int END = 30;
        public static final int RESETPLAY = 40;
    }

    public static class ADAPTER_FOOT_KEY {

        public static final Integer LOAD_MORE_FOOT_KEY = 100000002;
        public static final Integer REFRESH_RECYCLER_FOOT_KEY = 100000001;
    }

    public static final int GET_FILE_SYSTEM = 1002;
    public static final int PAGE_VALUE = 20;
    public static final String PAGE_SIZE = "pageSize";
    public static final String PAGE = "pageIndex";

    public static class FILE_FROM_TYPE {
        public static final int TYPE_NET = 1;
        public static final int TYPE_LOCAL = 2;
    }

    public static class SERVER_ERROR_CODE {

    }

    public static class BOOk_TYPE {
        //	资源类型 1：图书 2：文章 4：有声书 7:笔记id
        public static final int TYPE_VIDEO = 4;
        public static final int TYPE_ARTICLE = 2;
        public static final int TYPE_EBOOK = 1;
        public static final int TYPE_NOTE = 7;
        public static final int TYPE_Resources = 10;

    }


    public interface BANNER_TYPE {
        int HOME = 1;
    }


    public class PAY_TYPE {
        public static final int DELIVERY = 2;
        public static final int ONLINE = 1;
        public static final int PRE = 3;
    }

    /******************** 存储相关常量 ********************/
    /**
     * Byte与Byte的倍数
     */
    public static final int BYTE = 1;
    /**
     * KB与Byte的倍数
     */
    public static final int KB = 1024;
    /**
     * MB与Byte的倍数
     */
    public static final int MB = 1048576;
    /**
     * GB与Byte的倍数
     */
    public static final int GB = 1073741824;

    /******************** 时间相关常量 ********************/
    /**
     * 毫秒与毫秒的倍数
     */
    public static final int MSEC = 1;
    /**
     * 秒与毫秒的倍数
     */
    public static final int SEC = 1000;
    /**
     * 分与毫秒的倍数
     */
    public static final int MIN = 60000;
    /**
     * 时与毫秒的倍数
     */
    public static final int HOUR = 3600000;
    /**
     * 天与毫秒的倍数
     */
    public static final int DAY = 86400000;

    /******************** 正则相关常量 ********************/
    /**
     * 正则：手机号（简单）
     */
    public static final String REGEX_MOBILE_SIMPLE = "^[1]\\d{10}$";
    /**
     * 正则：手机号（精确）
     * <p>移动：134(0-8)、135、136、137、138、139、147、150、151、152、157、158、159、178、182、183、184、187、188</p>
     * <p>联通：130、131、132、145、155、156、175、176、185、186</p>
     * <p>电信：133、153、173、177、180、181、189</p>
     * <p>全球星：1349</p>
     * <p>虚拟运营商：170</p>
     */
    public static final String REGEX_MOBILE_EXACT = "^((13[0-9])|(14[5,7])|(15[0-3,5-9])|(17[0,3,5-8])|(18[0-9])|(147)|(19[0-9]))\\d{8}$";
    public static final String REGEX_MOBILE_EXACT_BDT = "^(01[3-9][0-9]|999)\\d{7}$";
    public static final String REGEX_MOBILE_EXACT_BDT2 = "^(1[3-9][0-9]|999)\\d{7}$";
    public static final String REGEX_MOBILE_EXACT_BDT3 = "^0?(1[3-9][0-9]|999)\\d{7}$";
    /**
     * 正则：电话号码
     */
    // public static final String REGEX_TEL = "^0\\d{2,3}[- ]?\\d{7,8}";
    /**
     * 正则：电话号码
     */
    public static final String REGEX_TEL = "^0\\d{2,3}[0-9]\\d{7,8}";
    /**
     * 正则：身份证号码15位
     */
    public static final String REGEX_IDCARD15 = "^[1-9]\\d{7}((0\\d)|(1[0-2]))(([0|1|2]\\d)|3[0-1])\\d{3}$";
    /**
     * 正则：身份证号码18位
     */
    public static final String REGEX_IDCARD18 = "^[1-9]\\d{5}[1-9]\\d{3}((0\\d)|(1[0-2]))(([0|1|2]\\d)|3[0-1])\\d{3}([0-9Xx])$";
    /**
     * 正则：邮箱
     */
    public static final String REGEX_EMAIL = "^\\w+([-+.]\\w+)*@\\w+([-.]\\w+)*\\.\\w+([-.]\\w+)*$";
    /**
     * 正则：URL
     */
    public static final String REGEX_URL = "http(s)?://([\\w-]+\\.)+[\\w-]+(/[\\w-./?%&=]*)?";
    /**
     * 正则：汉字
     */
    public static final String REGEX_CHZ = "^[\\u4e00-\\u9fa5]+$";
    /**
     * 正则：用户名，取值范围为a-z,A-Z,0-9,"_",汉字，不能以"_"结尾,用户名必须是6-20位
     */
    public static final String REGEX_USERNAME = "^[\\w\\u4e00-\\u9fa5]{6,20}(?<!_)$";
    /**
     * 正则：yyyy-MM-dd格式的日期校验，已考虑平闰年
     */
    public static final String REGEX_DATE = "^(?:(?!0000)[0-9]{4}-(?:(?:0[1-9]|1[0-2])-(?:0[1-9]|1[0-9]|2[0-8])|(?:0[13-9]|1[0-2])-(?:29|30)|(?:0[13578]|1[02])-31)|(?:[0-9]{2}(?:0[48]|[2468][048]|[13579][26])|(?:0[48]|[2468][048]|[13579][26])00)-02-29)$";
    /**
     * 正则：IP地址
     */
    public static final String REGEX_IP = "((2[0-4]\\d|25[0-5]|[01]?\\d\\d?)\\.){3}(2[0-4]\\d|25[0-5]|[01]?\\d\\d?)";
    public static final String REGEX_GUID = "^\\w{8}-(\\w{4}-){3}\\w{12}$";
    public static final String REGEX_PASSWORD = "^(?=.*\\d)(?=.*[A-Za-z]).{8,16}$";

    public class LoginPartType {
        public static final int Register = 1;
        public static final int Login = 2;
        public static final int Login_Phone = 3;
        public static final int Password_Reset = 4;
        public static final int Phone_Captcha_Image = 5;
        public static final int Phone_Verify_Code = 6;
        public static final int Phone_Reset = 7;
        public static final int Password_Set = 8;
        public static final int Phone_Bind = 9;

    }

    public class DOWNLOAD_STATUS {
        public static final int UN_START = 0;
        public static final int PENDING = 1;
        public static final int DOWNLOADING = 2;
        public static final int STOP = 3;
        public static final int SUCCESS = 4;
        public static final int ERROR = -1;


    }

    public class QUESTION_TYPE {
        public static final int CHOICE = 1;
        public static final int SHORT_ANSWER = 2;
    }

    public class NOTICE_MESSAGE_TYPE {
       // public static final int DEFAULT = 31110;
        public static final int DEFAULT = 311;
        public static final int DEFAULT1 = 31120;
        public static final int DEFAULT2 = 31121;
        public static final int DEFAULT3 = 31122;
        public static final int COURSE = 21;
        public static final int HOLIDAY = 31;
       // public static final int REMIND = 3211;//课程安排提醒
        public static final int REMIND = 321;//课程安排提醒

    }

    public class COMMENT_TYPE {
        public static final int REVIEW_HOMEWORK = 10;//点评了你的作业
        public static final int REPLY_HOMEWORK = 11;//回复了你的作业
        public static final int COMMENT_ANSWER_KEY = 21;//评论了你的题解

        public static final int COMMENT_REVIEWS_KEY = 22;//回复了你的题目评论
    }

    /*  QuizCommentReply(22, "题库-题目评论回复"),
      QuizExplanationComment(21, "题库-题解评论"),
      HomeworkAnswerGrade(10, "作业回答点评"),
      HomeworkAnswerComment(11, "作业回答评论");
      周小亮(晓。)
      QuizCommentReplyLike(24, "题库-题目评论回复点赞"),
      QuizCommentLike(23, "题库-题目评论点赞"),
      QuizExplanationCommentLike(22, "题库-题解评论点赞"),
      QuizExplanationLike(21, "题库-题解点赞"),
      HomeworkAnswerCommentLike(12, "作业回答评论点赞"),
      HomeworkAnswerLike(11, "作业回答点赞");*/
    public static  class LIKE_TYPE {
        public static final int LIKE_HOMEWORK = 11;//点赞了作业
        public static final int LIKE_HOMEWORK_ANSWER = 12;//点赞了评论 作业回答评论点赞
        public static final int LIKE_QUESTION_BAND_ANSWER_KEY = 21;//点赞了题解 题库-题解点赞
        public static final int LIKE_QUESTION_BAND_ANSWER_REVIEWS = 22;//点赞了评论 题库-题解评论点赞

        public static final int LIKE_QUESTION_BAND_REVIEWS = 23;//点赞了评论 题库-题目评论点赞
        public static final int LIKE_QUESTION_BAND_REVIEWS_DETAILS = 24;//题库-题目评论回复点赞
    }
}
